#ifndef _WDS_SFX_MANAGER_H_
#define _WDS_SFX_MANAGER_H_


#include "wds_sfx.h"
#include "wds_sounds.h"

#include "vfx/sfx.h"


class WDSSFXCollection;

namespace vfx
{
	class NumberFXSet;
	class SimpleTextSFX;
}

class WDSNumberSFX : public vfx::EffectMan
{
public:

	WDSNumberSFX();
	~WDSNumberSFX();
	
	void								AddNumber(int Number, const math::Vec2& Pos);

private:
	vfx::NumberFXSet*					m_pSfxFlyNumber;	

};

class WDSSFXManager
{

public:
	
	static WDSSFXManager&			Instance();
	


	
	
	void								Render(const math::Vec2& Offset,float Scale);
										// After UI
	void								PostRender(const math::Vec2& Offset,float Scale);
	void								RenderDebug(const math::Vec2& Offset,float Scale);
	void								Tick(float dt);


	void								ForceFinish();
	void								Clear();
	WDSSfx*								Spawn(
											WDSSfx::SFX_TYPES Type, 
											const math::Vec2& Pos,
											float SizeScale,
											float Rotation = 0,
											bool	bIsChache = false,
											WDSSounds::SOUND_NAMES SoundSFXName = WDSSounds::SFX_NONE
											
											);
	void								AddFlySfxNumber(int Number, const math::Vec2& Pos);

	WDSSfx*								GetCacheSfx(WDSSfx::SFX_TYPES Type);
	void								Cache();	
	
protected:

	WDSSFXManager();
	~WDSSFXManager();

	WDSNumberSFX						m_NumberSFX;
	
	
	std::vector<WDSSFXCollection*>		m_SFXCollections;
	std::vector<WDSSfx*>				m_CacheSfxs;	

};



#endif